package com.rockcent.mall.lib.domain;

import com.rockcent.common.domain.IDEntityMall;
import com.rockcent.common.domain.enumclass.Whether;
import com.rockcent.mall.lib.domain.enumclass.CouponDrawLimit;
import com.rockcent.mall.lib.domain.enumclass.CouponType;
import com.rockcent.mall.lib.domain.enumclass.CouponUseScope;
import com.rockcent.mall.lib.domain.enumclass.MerchantCouponStatus;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.*;
import java.math.BigDecimal;
import java.util.Date;

/**
 * Created by oyhk on 16/7/27.
 *
 * 卡券可使用的产品列表
 */
@Entity
@Table(name = "coupon_merchant_products")
@DynamicInsert
@DynamicUpdate
public class MerchantCouponProducts extends IDEntityMall {

    @Column(columnDefinition = "bigint comment '产品 id'")
    private Long productId;
    @Column(columnDefinition = "bigint comment '卡券 id'")
    private Long couponId;

    public Long getProductId() {
        return productId;
    }

    public void setProductId(Long productId) {
        this.productId = productId;
    }

    public Long getCouponId() {
        return couponId;
    }

    public void setCouponId(Long couponId) {
        this.couponId = couponId;
    }

    @Override
    public String toString() {
        return "MerchantCouponProducts{" +
                "id=" + id +
                ", dateCreated=" + dateCreated +
                ", productId=" + productId +
                ", lastUpdated=" + lastUpdated +
                ", couponId=" + couponId +
                ", isDelete=" + isDelete +
                ", version=" + version +
                '}';
    }
}
